home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: netcom.com!mictali
- From: mictali@netcom.com (Jere McDevitt)
- Subject: Re: my problem: class decl. syntax error in turbo c++ 1.0 ???
- Message-ID: <mictaliDL8Fyo.A5L@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- X-Newsreader: TIN [version 1.2 PL1]
- References: <pooky.23.000EEDAD@euronet.nl>
- Date: Mon, 15 Jan 1996 17:16:00 GMT
- Sender: mictali@netcom7.netcom.com
-
- pooky@euronet.nl wrote:
- : I'm using Borland Turbo C++ v1.00 on a 486dx2. Maybe the program is too old?
- : Anyway I get the following error:
-
- : class time {
- : int hr;
- : int min;
- : int sec;
- : };
-
- : ... generates a 'declaration syntax error', but
-
- : struct time {
- : int hr;
- : int min;
- : int sec;
- : };
-
- : ... runs correctly.
-
- : Does anyone know what could be the problem? Please react!
- : I suppose the problem is not in this code. Maybe I should I should
- : include some extra directories in my path?
-
- : Thanks for reading,
- : Remko.
-
- Possibly the problem is that by default, members in a class are private.
- This means that your class definition has no data accessible to the outside
- world and no member functions accessible. Try using a definition like this
- and see if it works.
-
- class time
- {
- public:
- int hr;
- int min;
- int sec;
- };
-
- Jere
-